package com.hulk.ratel.persistence.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hulk.ratel.persistence.entity.SuperEntity;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author hulk
 * @since 2021-03-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_partner_key")
public class PartnerKey extends SuperEntity<PartnerKey> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("partner_no")
    private String partnerNo;

    /**
     * RSA-RSA非对称算法
     */
    @TableField("key_algorithm")
    private String keyAlgorithm;

    @TableField("key_length")
    private Integer keyLength;

    @TableField("partner_publickey")
    private String partnerPublickey;

    @TableField("partner_publickey_suffix")
    private String partnerPublickeySuffix;

    @TableField("partner_privatekey")
    private String partnerPrivatekey;

    @TableField("partner_privatekey_suffix")
    private String partnerPrivatekeySuffix;

    @TableField("modulus")
    private String modulus;

    @TableField("platform_privatekey")
    private String platformPrivatekey;

    @TableField("platform_publickey")
    private String platformPublickey;

    @TableField("platform_privatekey_suffix")
    private String platformPrivatekeySuffix;

    @TableField("platform_publickey_suffix")
    private String platformPublickeySuffix;

    /**
     * RELATIVE-相对路径 ABSOLUTE-绝对路径 DATABASE-数据库存储
     */
    @TableField("keypath_type")
    private String keypathType;

    @TableField("made_time")
    private LocalDateTime madeTime;

    /**
     * Y-启用 N-关闭
     */
    @TableField("use_flag")
    private String useFlag;

    @TableField("start_date")
    private LocalDate startDate;

    @TableField("expiry_date")
    private LocalDate expiryDate;

    @TableField("created_by")
    private String createdBy;

    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    @TableField("updated_by")
    private String updatedBy;

    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedTime;

    @TableField("key_index")
    private String keyIndex;

    @TableField("remark")
    private String remark;

    @TableField("tenant_id")
    private String tenantId;

    @TableField("ori_id")
    private String oriId;

    @TableField("rsv1")
    private String rsv1;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
